using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace LPrisaMVC.Entities
{
    public partial class HISTORIAL_VENTAS
    {
        public int Id { get; set; }
        [Display(Name = "ProductoId")]
        [Required(ErrorMessage = "El Producto es requerido")]
        public int ProductoId { get; set; }

        [Display(Name = "Fecha")]
        [Required(ErrorMessage = "La fecha es requerida")]
        public System.DateTime Fecha { get; set; }

        [Display(Name = "Precio")]
        [Required(ErrorMessage = "El Precio es requerido")]
        [Range(0.1, 100000, ErrorMessage = "El Precio debe ser mayor a 0")]
        public decimal Precio { get; set; }

        [Display(Name = "Cantidad")]
        [Required(ErrorMessage = "La Cantidad es requerida")]
        [Range(1, 100000, ErrorMessage = "La cantidad debe ser mayor a 0")]
        public int Cantidad { get; set; }

        [Display(Name = "Total")]
        [Required(ErrorMessage = "El Total es requerido")]
        [Range(0.1, 100000, ErrorMessage = "El Total debe ser mayor a 0")]
        public decimal Total { get; set; }
        public Nullable<bool> Contado { get; set; }
        public Nullable<bool> Credito { get; set; }
        public Nullable<bool> Menudeo { get; set; }
        public virtual PRODUCTO PRODUCTO { get; set; }
    }
}
